<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');?>

<div class='title'>Dashboard</div>
Welcome, <?php echo $this->session->userdata('nama');?>, <?php echo anchor('home/logout','Logout');?>
<br /><br />
Menu yang tersedia untuk Anda :
<ul class="master-menu">
	<?php
	foreach($master_menu->result() as $row)
	{
		echo '<li>'.anchor($row->url,$row->title).'</li>';
		echo '<ul class="sub-menu">';
		foreach($level_menu->result() as $subrow)
		{
			if($row->id == $subrow->parent_id){
				echo '<li>'.anchor($subrow->url,$subrow->title).'</li>';
			}
		}
		echo '</ul>';
	}
	?>
</ul>